<!DOCTYPE html>
<html>
<head>
	<title>登录</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<style type="text/css">
	body center{
		width:1366px;
		height:768px;
		background:url(201.jpg);
		background-size:100% 100%;
		margin:0 auto;
	}	
    center{
       padding-top:60px;
	}	   
	input{
		width:200px;
		height:40px;
		font-size:20px;
		padding-left:10px;
		margin-top:20px;
	}
	</style>
</head>
<body>
<center>
<?php
include "check_admin.php";
include "config.php";
$sql="select *from $test_question where id='$_GET[id]'";
$result=$mysqli->query($sql);
$row=$result->fetch_array();
echo "<table border='1'>";
echo "<tr><td>题目类型:</td><td>";
if ($row["type"]==1) echo "选择题";
else echo "判断题";
echo "</td></tr>";
echo "<tr><td>题目内容</td><td>";
echo $row["content"];
echo "</td></tr>";
echo "<tr><td>题目答案</td><td>";
if($row["type"]==1)  //选择题
{
	$sql2="select * from $test_answer where question='$_GET[id]'";
	$result2=$mysqli->query($sql2);
	while ($row2=$result2->fetch_array())
	{
		echo $row2["content"];
		if ($row2["answer"]==1) echo "  正确";
		echo "<br>";
	}
}
else //判断题
{
	if($row2["answer"]==1) echo " 正确";
	else echo " 错误";
}
echo "</td></tr>";
echo "</table>";
echo "<p><a href=admin.php>返回</a>";
?>
</center>
</body>
</html>